<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var count = Number(prompt("请输入直角三角形边长："));
        // document.write("<center>")

        for (var i = 0; i <= count; i++) {
            for (var j = 0; j <= i; j++) {
                document.write("* ");
            }
            document.write("<br>")
        }
    </script>
</body>

</html>